/*******************************************************************************
 * Copyright (c) 2004, 2005 Jean-Michel Lemieux, Jeff McAffer and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Hyperbola is an RCP application developed for the book
 *     Eclipse Rich Client Platform -
 *         Designing, Coding, and Packaging Java Applications
 *         (http://eclipsercp.org)
 * Contributors:
 *     Jean-Michel Lemieux and Jeff McAffer - initial implementation
 *******************************************************************************/
package org.reliablesource.prism.product.jface;

import org.eclipse.core.runtime.IPlatformRunnable;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.window.ApplicationWindow;

public class Application implements IPlatformRunnable {

	private ApplicationWindow mainWindow;

	public Object run(Object args) throws Exception {
		// Take down the splash screen if there was one
		Platform.endSplash();
		
		// Create application window and create the roster
		mainWindow = new PrismApplicationWindow(null /* top level */);
		mainWindow.create();
		mainWindow.setBlockOnOpen(true);
		int retVal = mainWindow.open();
		return new Integer(retVal);
	}
}
